﻿
-- ================================================
-- Remarks: 
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Ivy_UserProfile_GetByID')
	BEGIN
		DROP  Procedure  Ivy_UserProfile_GetByID
	END

GO

CREATE PROCEDURE [Ivy_UserProfile_GetByID]
-- =============================================
-- Author:		<Ali Balci>
-- Create date: <01/03/2011>
-- Description:	<Ivy_UserProfile_GetByID>
-- =============================================
-- Add the parameters for the stored procedure here
	(
				@UserKey int
	)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT OFF;

	SELECT	[UserKey],
			[UserFullName],
			[UserSex],
			[UserDateOfBirth],
			[UserAlternateEmailID],
			[UserContactNumber],
			[UserContactAddress],
			[Sys_DateOfCreation],
			[Sys_DateOfModification],
			[Sys_CreatedByID],
			[Sys_ModifiedByID],
			[Sys_DeleteType],
			[Sys_IsDeleted],
			[Sys_OrganizationID],
			[Sys_InitialPrimaryKeys],
			[Sys_WorkstationName]
	FROM	[UserProfile]
	WHERE 
		(		
			[UserKey] = @UserKey 
		);
END
GO